﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace QbservableCore.Serialization
{
    static internal class Unary
    {
        public static void ToJson(UnaryExpression node, ExpressionToJson state)
        {
            JContainer result = state.CreateAndTransform(node.Operand);
            state.JsonCurrent.AddProperty(node.Type, state);
            state.JsonCurrent.AddPropertyRaw(Consts.Json.Unary, result, state);
        }
    }
}
